package hanlen.mq.starter.constants;

import lombok.experimental.UtilityClass;

/**
 * archives-service
 *
 * @author MrYe
 * @Description
 * @date 2021-10-23 20:48
 */
@UtilityClass
public class QueueConstants {

    public static final String CORE_POOL_SIZE = "corePoolSize";

    public static final String MAX_POOL_SIZE = "maxPoolSize";

    public static final String KEEP_ALIVE_SECOND = "keepAliveSecond";

    public static final String BLOCK_QUEUE_SIZE = "blockQueueSize";

    public static final String MESSAGE_ID = "messageId";

    public static final String DLQ_SUFFIX = "_dlq";

    public static final String SEPARATOR = ":";

    public static String getDeadQueueKey(String queueName) {
        return queueName + DLQ_SUFFIX;
    }

    public static String getRetryKey(String messageId) {
        return messageId + "_retry";
    }

    public static String getSizeKey(String queueName) {
        return queueName + "_size";
    }

}
